package document;

import java.awt.Color;
import java.util.HashMap;

public class AwesomeDocument {
	/**
	 * The extension associated with this document type.
	 */
	private String extension;
	
	/**
	 * The document type label. The name.
	 */
	private String label;
	
	/**
	 * Library mapping colors to key words.
	 */
	private HashMap<String, Color> dictionary;
	
	
	public AwesomeDocument() {
		this.extension = "";
		this.label = "";
		this.dictionary = new HashMap<String, Color>();
	}
	
	public AwesomeDocument(String extension, String label) {
		this.extension = extension;
		this.label = label;
		this.dictionary = new HashMap<String, Color>();
	}
	
	public String getExtension() {
		return extension;
	}

	public void setExtension(String extension) {
		this.extension = extension;
	}
	
	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	public HashMap<String, Color> getLibrary() {
		return dictionary;
	}

	public void setLibrary(HashMap<String, Color> library) {
		this.dictionary = library;
	}
	
	public void setColorBinding(String key, Color color) {
		if ( key != null && color != null)
			this.dictionary.put(key, color);
	}
	
}
